<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>comment</title>
    <script src="/javascripts/xheditor/jquery/jquery-1.4.4.min.js" charset="utf-8"></script>
	<script src="/javascripts/xheditor/xheditor-1.2.2.min.js" charset="utf-8"></script>
    <script src="/javascripts/xheditor/xheditor_lang/zh-cn.js" charset="utf-8"></script>
    <style>
        table{
            border-spacing: 0;
            border: 1px solid #00E7FC;
            margin: 0 auto;
        }
        td{
            min-width: 200px;
            text-align: center;
            height: 30px;
        }
    </style>
</head>
<body>
    <a href="">nihao:<%= name %></a>
    <table border="1">
        <tr>
            <td>序号</td><td>用户</td><td>标题</td><td>内容</td>
        </tr>
        <% list.forEach((val,index)=>{ %>
            <tr>
                <td><%= index %></td>
                <td><%= val.email %></td>
                <td><%= val.title %></td>
                <td><%- val.content %></td>
            </tr>
        <%}) %>
        <tr>
            <td colspan="4">
                <a href="/comment?pageNo=1">首页</a>
                <a href="/comment?pageNo=<%= pageNo>1?pageNo-1:1%>">上一页</a>
                <a href="/comment?pageNo=<%= pageNo<totalPage?pageNo-0+1:totalPage%>">下一页</a>
                <a href="/comment?pageNo=<%= totalPage %>">尾页</a>
            </td>
        </tr>
    </table>
    <form method="post" action="comment/commentFile">
        评论标题：<input type="text" name="title"><br>
        <br>
        评论内容：<textarea name="content" id="content" cols="100" rows="30"></textarea><br>
        <br>
        <input type="submit" value="确定"><br>
        <br>
    </form>
</body>
</html>
<script type="text/javascript">
    $(pageInit);
    function pageInit()
    {
        $('#content').xheditor({
            html5Upload:false,
            upMultple:"1",

            upLinkUrl:"upload.php",
            upLinkExt:"zip,rar,txt",

            upImgUrl:"comment/uploadImg",
            upImgExt:"jpg,jpeg,gif,png",
            
            upFlashUrl:"upload.php",
            upFlashExt:"swf",
            
            upMediaUrl:"upload.php",
            upMediaExt:"wmv,avi,wma,mp3,mid"
        });
    }
</script>